package com.guodi.map.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
* @描述:  自定义查询统计表 实体类
* @作者: 陈宏成
* @日期: 2021-10-29
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("map_custom_query")
@ApiModel(value="MapCustomQuery对象", description="")
public class MapCustomQuery implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @Length(max = 32, message = "主键ID最大为32个字符")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "名称")
    @Length(max = 255, message = "名称最大为255个字符")
    @NotBlank(message = "名称不能为空")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty(value = "分析图层ID")
    @Length(max = 32, message = "分析图层ID最大为32个字符")
    @NotBlank(message = "分析图层ID不能为空")
    @TableField(value = "layer_id")
    private String layerId;

    @ApiModelProperty(value = "分析类型(0:属性查询 1:字段统计)")
    @Length(max = 10, message = "分析类型(0:属性查询 1:字段统计)最大为10个字符")
    @NotBlank(message = "分析类型(0:属性查询 1:字段统计)不能为空")
    @TableField(value = "type")
    private String type;

    @ApiModelProperty(value = "分析字段")
    @Length(max = 2000, message = "分析字段最大为2000个字符")
    @TableField(value = "statistics_field")
    private String statisticsField;

    @ApiModelProperty(value = "分析字段条件")
    @Length(max = 2000, message = "分析字段条件最大为2000个字符")
    @TableField(value = "statistics_condition")
    private String statisticsCondition;

    @ApiModelProperty(value = "分组字段")
    @Length(max = 2000, message = "统计字段最大为2000个字符")
    @TableField(value = "group_field")
    private String groupField;

    @ApiModelProperty(value = "自定义统计范围")
    @TableField(value = "defined_geometry")
    private String definedGeometry;

    @ApiModelProperty(value = "备份一")
    @Length(max = 255, message = "备份一最大为255个字符")
    @TableField(value = "memo1")
    private String memo1;

    @ApiModelProperty(value = "备份二")
    @Length(max = 255, message = "备份二最大为255个字符")
    @TableField(value = "memo2")
    private String memo2;

    @ApiModelProperty(value = "创建人")
    @Length(max = 32, message = "创建人最大为32个字符")
    @TableField(value = "creator", updateStrategy = FieldStrategy.NEVER)
    private String creator;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", updateStrategy = FieldStrategy.NEVER)
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    @Length(max = 32, message = "修改人最大为32个字符")
    @TableField(value = "modifier", insertStrategy = FieldStrategy.NEVER)
    private String modifier;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "modify_time", insertStrategy = FieldStrategy.NEVER)
    private Date modifyTime;

    @ApiModelProperty(value = "统计字段")
    private String sumField;

}
